// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成
package com.fowo.api.controller;

import com.fowo.api.common.model.R;
import com.fowo.api.model.quality.check.storage.bad.info.QualityCheckStorageBadInfoVo;
import com.fowo.api.service.QualityCheckStorageBadInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.List;
import java.util.Map;
import javax.annotation.Resource;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Tag(name = "质检次品信息")
@RequestMapping("/api/quality-check-storage-bad-info")
@RestController
public class QualityCheckStorageBadInfoController {

  @Resource
  private QualityCheckStorageBadInfoService service;


  @Operation(summary = "获取列表")
  @GetMapping("listSearch")
  public R<List<Map<String, Object>>> listSearch(@RequestParam(name = "parentIds")  List<Long> parentIds) {
    return R.data(() -> service.listSearch(parentIds));
  }



  @Operation(summary = "新增")
  @PostMapping
  public R<Boolean> create(
    @Validated @RequestBody List<QualityCheckStorageBadInfoVo> list
  ) {
    return R.data(() -> service.create(list));
  }




}
